package com.czkt.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.czkt.entity.CstCustomer;
import com.czkt.entity.vo.CstCustomerBasDict;
import com.czkt.mapper.CstCustomerMapper;
import com.czkt.service.ICstCustomerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2024-06-18
 */
@Service
public class CstCustomerServiceImpl extends ServiceImpl<CstCustomerMapper, CstCustomer> implements ICstCustomerService {

    @Resource
    CstCustomerMapper cstCustomerMapper;

    @Override
    public IPage<CstCustomerBasDict> cusTomerBas(String custName, String custRegion, Integer pageIndex, Integer pageSize) {
        Page<CstCustomerBasDict> cstCustomerBasDictPage = new Page<>(pageIndex,pageSize);
        return cstCustomerMapper.cusTomerBas(cstCustomerBasDictPage,custName, custRegion);
    }

    @Override
    public int deleteByCustAddr(String custNo) {
        return cstCustomerMapper.deleteByCustAddr(custNo);
    }

}
